<!DOCTYPE html>
<html lang="en-us">
  
  <head>
  <meta charset="UTF-8">
  <title>xmake</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="theme-color" content="#157878">
  <meta name="description" content="一个基于Lua的轻量级自动构建工具">
  <meta name="keywords" content="make,makefile,构建工具,编译工具,lua,跨平台,跨平台开发,linux,交叉编译" /> 

  <link rel="stylesheet" href="/assets/css/normalize.css">
  <link rel='stylesheet' href="/assets/css/opensans.css" type='text/css'>
  <link rel="stylesheet" href="/assets/css/cayman.css">

  <!-- baidu stats -->
    <script>
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "//hm.baidu.com/hm.js?eb3c91c672a001d78a113bfb8e42017a";
      var s = document.getElementsByTagName("script")[0]; 
      s.parentNode.insertBefore(hm, s);
    })();
    </script>
</head>


  <body>
    <section class="page-header">
  <h1 class="project-name">xmake</h1>
  <h2 class="project-tagline">一个基于Lua的轻量级自动构建工具</h2>
  <a href="/#/zh/" class="btn">开始使用</a>
  <br><br>
  <iframe src="https://ghbtns.com/github-btn.html?user=tboox&repo=xmake&type=star&count=true" frameborder="0" scrolling="0" width="110px" height="20px"></iframe>
    <span class="donate" style="width: 86px">
      <img src="/assets/img/patreon.png">
      <a href="/cn/pages/donation.html#donate">支持我们</a>
    </span>
  <br><br>
<ul id="translations">
      <li><a href="/cn/" class="nav-link">中文</a></li>
      <li class="delimiter">|</li>
      <li><a href="/" class="nav-link">English</a></li>
    </ul>
</section>



    <section class="main-content">
      
      <h2 id="section">安装</h2>

<h4 id="curl">使用curl</h4>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>bash &lt;<span class="o">(</span>curl -fsSL http://xmake.io/get.sh<span class="o">)</span>
</code></pre>
</div>

<h4 id="wget">使用wget</h4>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>bash &lt;<span class="o">(</span>wget http://xmake.io/get.sh -O -<span class="o">)</span>
</code></pre>
</div>

<h4 id="powershell">使用powershell</h4>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>Invoke-Expression <span class="o">(</span>Invoke-Webrequest <span class="s1">'http://xmake.io/get.ps1'</span> -UseBasicParsing<span class="o">)</span>.Content
</code></pre>
</div>

<h2 id="section-1">简单的工程描述</h2>

<div class="language-lua highlighter-rouge"><pre class="highlight"><code><span class="n">target</span><span class="p">(</span><span class="s2">"console"</span><span class="p">)</span>
    <span class="n">set_kind</span><span class="p">(</span><span class="s2">"binary"</span><span class="p">)</span>
    <span class="n">add_files</span><span class="p">(</span><span class="s2">"src/*.c"</span><span class="p">)</span> 
</code></pre>
</div>

<h2 id="section-2">构建工程</h2>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake
</code></pre>
</div>

<h2 id="section-3">运行目标</h2>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake run console
</code></pre>
</div>

<h2 id="section-4">调试程序</h2>

<div class="language-bash highlighter-rouge"><pre class="highlight"><code><span class="gp">$ </span>xmake run -d console
</code></pre>
</div>

<h2 id="section-5">支持特性</h2>

<ul>
  <li>Tasks</li>
  <li>Macros</li>
  <li>Actions</li>
  <li>Options</li>
  <li>Plugins</li>
  <li>Templates</li>
</ul>

<h2 id="section-6">支持平台</h2>

<ul>
  <li>Windows (x86, x64)</li>
  <li>Macosx (i386, x86_64)</li>
  <li>Linux (i386, x86_64, cross-toolchains …)</li>
  <li>Android (armv5te, armv6, armv7-a, armv8-a, arm64-v8a)</li>
  <li>iPhoneOS (armv7, armv7s, arm64, i386, x86_64)</li>
  <li>WatchOS (armv7k, i386)</li>
  <li>Mingw (i386, x86_64)</li>
</ul>

<h2 id="section-7">支持语言</h2>

<ul>
  <li>C/C++</li>
  <li>Objc/Objc++</li>
  <li>Swift</li>
  <li>Assembly</li>
  <li>Golang</li>
  <li>Rust</li>
  <li>Dlang</li>
</ul>

<h2 id="section-8">内置插件</h2>

<ul>
  <li>宏记录脚本和回放插件</li>
  <li>加载自定义lua脚本插件</li>
  <li>生成IDE工程文件插件（makefile, vs2002 - vs2017, …）</li>
  <li>生成doxygen文档插件</li>
</ul>

<h2 id="section-9">更多插件</h2>

<p>请到插件仓库进行下载安装: <a href="https://github.com/tboox/xmake-plugins">xmake-plugins</a>.</p>

<h2 id="section-10">使用演示</h2>

<p><a href="https://github.com/tboox/xmake"><img src="http://tboox.org/static/img/xmake/build_demo.gif" alt="usage_demo" /></a></p>

<h2 id="section-11">联系方式</h2>

<ul>
  <li>邮箱：<a href="mailto:waruqi@gmail.com">waruqi@gmail.com</a></li>
  <li>主页：<a href="http://www.tboox.org/cn">tboox.org</a></li>
  <li>社区：<a href="https://github.com/tboox/community/issues">TBOOX开源社区</a></li>
  <li>聊天：<a href="https://gitter.im/tboox/tboox?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge&amp;utm_content=badge"><img src="https://badges.gitter.im/tboox/tboox.svg" alt="Join the chat at https://gitter.im/tboox/tboox" /></a></li>
  <li>源码：<a href="https://github.com/tboox/xmake">Github</a>, <a href="https://gitee.com/tboox/xmake">Gitee</a></li>
  <li>QQ群：343118190</li>
  <li>微信公众号：tboox-os</li>
</ul>



      <footer class="site-footer">
  <span class="site-footer-owner">Copyright (c) 2015-2017 <a href="http://www.tboox.org">tboox.org</a>.</span>
  <span class="site-footer-power">
    <span>
        <!--Site powered by <a href="https://jekyllrb.com/">Jekyll</a> & <a href="http://pages.coding.me">Coding Pages</a>.-->
        Site powered by <a href="https://jekyllrb.com/">Jekyll</a> & <a href="https://pages.github.com/">Github Pages</a>.
    </span>
    <span>
        Theme designed by <a href="https://github.com/pietromenna/jekyll-cayman-theme">cayman</a>.
    </span>
</span>
</footer>


    </section>

  </body>
</html>
